﻿using Microsoft.Extensions.Configuration;
using ServiceStack.Redis;
using System;

namespace RedisChapter1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello Redis!");

            #region string
            //Console.WriteLine("**************string********************");
            //Data_StringTest.Show();

            #endregion

            #region hash
            Console.WriteLine("**************Hash********************");
            Data_HashTest.Show();

            #endregion


            #region 秒杀

            //var builder = new ConfigurationBuilder().AddCommandLine(args);
            //var configuration = builder.Build();
            //Console.WriteLine(configuration["para_1"]);
            //Console.WriteLine(configuration["para_2"]);

            //var builder = new ConfigurationBuilder().AddCommandLine(args);
            //var configuration = builder.Build();
            //string id = configuration["id"];
            //int minute = int.Parse(configuration["minute"]);
            //Console.WriteLine("开始"+id);

            //using var client = new RedisClient("127.0.0.1",6379,"Shris2020");
            //client.Set<int>("number",10);

            //Seckill.Show(id,minute);

            #endregion
        }
    }
}
